# -*- coding: utf8 -*-
from player import Player
from equipment import Equipment
from item import Item
import unittest
from pocket import Bag
class Bagtest(unittest.TestCase):
    def test_bag(self):
        b=Bag()
        ren=Player(mhp=10,hp=10)
        self.assertEqual(b.addItem(ren),False)
        yao=Item(hp=10)
        self.assertEqual(b.addItem(yao),True)
        wuqi=Equipment(atk=10)
        self.assertEqual(b.addItem(wuqi),True)
        yao1=Item(hp=11)
        yao2=Item(hp=12)
        yao3=Item(hp=13)
        yao4=Item(hp=14)
        yao5=Item(hp=15)
        yao6=Item(hp=16)
        yao7=Item(hp=17)
        wuqi1=Equipment(atk=21)
        wuqi2=Equipment(atk=22)
        b.addItem(yao1)
        b.addItem(yao2)
        b.addItem(yao3)
        b.addItem(yao4)
        b.addItem(yao5)
        b.addItem(yao6)
        b.addItem(yao7)
        b.addItem(wuqi1)
        self.assertEqual(b.addItem(wuqi2),False)

if __name__ == '__main__':
    unittest.main()
